module CnSms
  module Adapter
    class Mock < Base
      mattr_accessor :sent_sms
      @@sent_sms = nil

      def initialize(config)
        @@sent_sms = []
      end

      def send(phone,msg)
        super(phone,msg)
        @@sent_sms += [{:phone=>phone,:msg=>msg}]
        puts "sms sent phone:#{phone}. Message:#{msg}"
      end
    end
  end
end